from mediator import mediator
from mediator . tests . test_assistant import make_mediator_test_keyword_args

class main_menu_fake :
    def __init__ ( self ) :
        self . _show_main_menu = False
        self . _hide_main_menu = False
    def show_main_menu ( self ) :
        self . _show_main_menu = True
    def hide_main_menu ( self ) :
        self . _hide_main_menu = True

class arbitrary_module_fake :
    def show_main_menu ( self ) :
        pass
    def hide_main_menu ( self ) :
        pass

class mediator_main_menu_tests : 
    'mediator_main_menu'
    def __init__ ( self , test ) :
        self . _test = test
        self . _main_menu = main_menu_fake ( )
        self . _mediator = mediator ( )
        self . _mediator . register_modules ( ** make_mediator_test_keyword_args \
            ( 'main_menu' 
            , self . _main_menu
            , arbitrary_module_fake
            ) )
    def test_show_main_menu ( self ) :
        self . _mediator . show_main_menu ( )
        self . _test . assume_true ( self . _main_menu . _show_main_menu )
    def test_hide_main_menu ( self ) :
        self . _mediator . hide_main_menu ( )
        self . _test . assume_true ( self . _main_menu . _hide_main_menu )
